{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## <font color=\"maroon\"><h4 align=\"center\">Pandas Group By</font>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**In this tutorial we are going to look at weather data from various cities and see how group by can be used to run some analytics.** "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>day</th>\n",
       "      <th>city</th>\n",
       "      <th>temperature</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>event</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>new york</td>\n",
       "      <td>32</td>\n",
       "      <td>6</td>\n",
       "      <td>Rain</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1/2/2017</td>\n",
       "      <td>new york</td>\n",
       "      <td>36</td>\n",
       "      <td>7</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1/3/2017</td>\n",
       "      <td>new york</td>\n",
       "      <td>28</td>\n",
       "      <td>12</td>\n",
       "      <td>Snow</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>new york</td>\n",
       "      <td>33</td>\n",
       "      <td>7</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>90</td>\n",
       "      <td>5</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1/2/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>85</td>\n",
       "      <td>12</td>\n",
       "      <td>Fog</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1/3/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>87</td>\n",
       "      <td>15</td>\n",
       "      <td>Fog</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>92</td>\n",
       "      <td>5</td>\n",
       "      <td>Rain</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>paris</td>\n",
       "      <td>45</td>\n",
       "      <td>20</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1/2/2017</td>\n",
       "      <td>paris</td>\n",
       "      <td>50</td>\n",
       "      <td>13</td>\n",
       "      <td>Cloudy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1/3/2017</td>\n",
       "      <td>paris</td>\n",
       "      <td>54</td>\n",
       "      <td>8</td>\n",
       "      <td>Cloudy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>paris</td>\n",
       "      <td>42</td>\n",
       "      <td>10</td>\n",
       "      <td>Cloudy</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         day      city  temperature  windspeed   event\n",
       "0   1/1/2017  new york           32          6    Rain\n",
       "1   1/2/2017  new york           36          7   Sunny\n",
       "2   1/3/2017  new york           28         12    Snow\n",
       "3   1/4/2017  new york           33          7   Sunny\n",
       "4   1/1/2017    mumbai           90          5   Sunny\n",
       "5   1/2/2017    mumbai           85         12     Fog\n",
       "6   1/3/2017    mumbai           87         15     Fog\n",
       "7   1/4/2017    mumbai           92          5    Rain\n",
       "8   1/1/2017     paris           45         20   Sunny\n",
       "9   1/2/2017     paris           50         13  Cloudy\n",
       "10  1/3/2017     paris           54          8  Cloudy\n",
       "11  1/4/2017     paris           42         10  Cloudy"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "df = pd.read_csv(\"weather_by_cities.csv\")\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### For this dataset, get following answers,\n",
    "#### 1. What was the maximum temperature in each of these 3 cities?\n",
    "#### 2. What was the average windspeed in each of these 3 cities?\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pandas.core.groupby.groupby.DataFrameGroupBy object at 0x0000018EE2064E10>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g = df.groupby(\"city\")\n",
    "g"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**DataFrameGroupBy object looks something like below,**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"group_by_cities.png\">"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "city: mumbai\n",
      "\n",
      "\n",
      "data:         day    city  temperature  windspeed  event\n",
      "4  1/1/2017  mumbai           90          5  Sunny\n",
      "5  1/2/2017  mumbai           85         12    Fog\n",
      "6  1/3/2017  mumbai           87         15    Fog\n",
      "7  1/4/2017  mumbai           92          5   Rain\n",
      "city: new york\n",
      "\n",
      "\n",
      "data:         day      city  temperature  windspeed  event\n",
      "0  1/1/2017  new york           32          6   Rain\n",
      "1  1/2/2017  new york           36          7  Sunny\n",
      "2  1/3/2017  new york           28         12   Snow\n",
      "3  1/4/2017  new york           33          7  Sunny\n",
      "city: paris\n",
      "\n",
      "\n",
      "data:          day   city  temperature  windspeed   event\n",
      "8   1/1/2017  paris           45         20   Sunny\n",
      "9   1/2/2017  paris           50         13  Cloudy\n",
      "10  1/3/2017  paris           54          8  Cloudy\n",
      "11  1/4/2017  paris           42         10  Cloudy\n"
     ]
    }
   ],
   "source": [
    "for city, data in g:\n",
    "    print(\"city:\",city)\n",
    "    print(\"\\n\")\n",
    "    print(\"data:\",data)    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**This is similar to SQL,**\n",
    "\n",
    "**SELECT * from weather_data GROUP BY city**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>day</th>\n",
       "      <th>city</th>\n",
       "      <th>temperature</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>event</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>90</td>\n",
       "      <td>5</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1/2/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>85</td>\n",
       "      <td>12</td>\n",
       "      <td>Fog</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1/3/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>87</td>\n",
       "      <td>15</td>\n",
       "      <td>Fog</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>mumbai</td>\n",
       "      <td>92</td>\n",
       "      <td>5</td>\n",
       "      <td>Rain</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        day    city  temperature  windspeed  event\n",
       "4  1/1/2017  mumbai           90          5  Sunny\n",
       "5  1/2/2017  mumbai           85         12    Fog\n",
       "6  1/3/2017  mumbai           87         15    Fog\n",
       "7  1/4/2017  mumbai           92          5   Rain"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.get_group('mumbai')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>day</th>\n",
       "      <th>temperature</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>event</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>city</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>mumbai</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>92</td>\n",
       "      <td>15</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new york</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>36</td>\n",
       "      <td>12</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>paris</th>\n",
       "      <td>1/4/2017</td>\n",
       "      <td>54</td>\n",
       "      <td>20</td>\n",
       "      <td>Sunny</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               day  temperature  windspeed  event\n",
       "city                                             \n",
       "mumbai    1/4/2017           92         15  Sunny\n",
       "new york  1/4/2017           36         12  Sunny\n",
       "paris     1/4/2017           54         20  Sunny"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>temperature</th>\n",
       "      <th>windspeed</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>city</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>mumbai</th>\n",
       "      <td>88.50</td>\n",
       "      <td>9.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new york</th>\n",
       "      <td>32.25</td>\n",
       "      <td>8.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>paris</th>\n",
       "      <td>47.75</td>\n",
       "      <td>12.75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          temperature  windspeed\n",
       "city                            \n",
       "mumbai          88.50       9.25\n",
       "new york        32.25       8.00\n",
       "paris           47.75      12.75"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**This method of splitting your dataset in smaller groups and then applying an operation \n",
    "(such as min or max) to get aggregate result is called Split-Apply-Combine. It is illustrated in a diagram below**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"split_apply_combine.png\">"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>day</th>\n",
       "      <th>temperature</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>event</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>city</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>mumbai</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>85</td>\n",
       "      <td>5</td>\n",
       "      <td>Fog</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new york</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>28</td>\n",
       "      <td>6</td>\n",
       "      <td>Rain</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>paris</th>\n",
       "      <td>1/1/2017</td>\n",
       "      <td>42</td>\n",
       "      <td>8</td>\n",
       "      <td>Cloudy</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               day  temperature  windspeed   event\n",
       "city                                              \n",
       "mumbai    1/1/2017           85          5     Fog\n",
       "new york  1/1/2017           28          6    Rain\n",
       "paris     1/1/2017           42          8  Cloudy"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"8\" halign=\"left\">temperature</th>\n",
       "      <th colspan=\"8\" halign=\"left\">windspeed</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>city</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>mumbai</th>\n",
       "      <td>4.0</td>\n",
       "      <td>88.50</td>\n",
       "      <td>3.109126</td>\n",
       "      <td>85.0</td>\n",
       "      <td>86.50</td>\n",
       "      <td>88.5</td>\n",
       "      <td>90.50</td>\n",
       "      <td>92.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>9.25</td>\n",
       "      <td>5.057997</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.00</td>\n",
       "      <td>8.5</td>\n",
       "      <td>12.75</td>\n",
       "      <td>15.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new york</th>\n",
       "      <td>4.0</td>\n",
       "      <td>32.25</td>\n",
       "      <td>3.304038</td>\n",
       "      <td>28.0</td>\n",
       "      <td>31.00</td>\n",
       "      <td>32.5</td>\n",
       "      <td>33.75</td>\n",
       "      <td>36.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>8.00</td>\n",
       "      <td>2.708013</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.75</td>\n",
       "      <td>7.0</td>\n",
       "      <td>8.25</td>\n",
       "      <td>12.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>paris</th>\n",
       "      <td>4.0</td>\n",
       "      <td>47.75</td>\n",
       "      <td>5.315073</td>\n",
       "      <td>42.0</td>\n",
       "      <td>44.25</td>\n",
       "      <td>47.5</td>\n",
       "      <td>51.00</td>\n",
       "      <td>54.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>12.75</td>\n",
       "      <td>5.251984</td>\n",
       "      <td>8.0</td>\n",
       "      <td>9.50</td>\n",
       "      <td>11.5</td>\n",
       "      <td>14.75</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         temperature                                                   \\\n",
       "               count   mean       std   min    25%   50%    75%   max   \n",
       "city                                                                    \n",
       "mumbai           4.0  88.50  3.109126  85.0  86.50  88.5  90.50  92.0   \n",
       "new york         4.0  32.25  3.304038  28.0  31.00  32.5  33.75  36.0   \n",
       "paris            4.0  47.75  5.315073  42.0  44.25  47.5  51.00  54.0   \n",
       "\n",
       "         windspeed                                                 \n",
       "             count   mean       std  min   25%   50%    75%   max  \n",
       "city                                                               \n",
       "mumbai         4.0   9.25  5.057997  5.0  5.00   8.5  12.75  15.0  \n",
       "new york       4.0   8.00  2.708013  6.0  6.75   7.0   8.25  12.0  \n",
       "paris          4.0  12.75  5.251984  8.0  9.50  11.5  14.75  20.0  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "city\n",
       "mumbai      4\n",
       "new york    4\n",
       "paris       4\n",
       "dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.size()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>day</th>\n",
       "      <th>temperature</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>event</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>city</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>mumbai</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new york</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>paris</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          day  temperature  windspeed  event\n",
       "city                                        \n",
       "mumbai      4            4          4      4\n",
       "new york    4            4          4      4\n",
       "paris       4            4          4      4"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "city\n",
       "mumbai      Axes(0.125,0.125;0.775x0.755)\n",
       "new york    Axes(0.125,0.125;0.775x0.755)\n",
       "paris       Axes(0.125,0.125;0.775x0.755)\n",
       "dtype: object"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt0XGX97/H3N9fJPWkSciEtTaEttbfUpoVSWy0FucgB\nf2cBSymXgksQXVI9RxQvHDhrKQcP6FIURJAqZwkolJ+2B8WF3I4UlJIC1kKpKRBo2rRNQ5P0knue\n88feSWZyaaZpksnsfl5rzdoze++ZeXZ25pPvPPvZO+acQ0RE4l9CrBsgIiKjQ4EuIhIQCnQRkYBQ\noIuIBIQCXUQkIBToIiIBoUAXEQkIBbqISEAo0EVEAiJpPN+soKDATZ06dTzfUkQk7m3evHm/c65w\nuPXGNdCnTp1KVVXVeL6liEjcM7MPollPXS4iIgGhQBcRCQgFuohIQCjQRUQCQoEuIhIQCnQRkYBQ\noIuIBMS4jkMXEQk65xzNrZ3UNbVQ19hKXVMrdU0tXLZwMlPy08f0vRXoIiLH4GBrB3VNrexubGFP\nUyu7m1qpa2xhT7M3r66plSPtXRHPSTD4+JQ8BbqIyHg53OZV1rsbW/2w9qvsZi+065paOdTWGfEc\nMyjMTKUkN40ZRVksn1FIaU4aJbkhSnJClOSkcVJWKkmJY9/DrUAXkRNCS3tXX0A3tfR2hdQ1tVLX\n6IX3wdbOAc8ryEylNDfEtMIMlp5W4IV0bpof1iGKskMkj0NYRyMuAr2725GQYLFuhohMUK0dXX4w\n9wX17ia/yvbnNbV0DHhefkYKJbkhpuSnc8a0SZTkpFGaG6I4O0RpbhpF2SFSkiZGWEcjLgL9+3/a\nxpOv1/b+RSzJTaMk25uW5oQo9r/WpKUkxrqpIjLK2jq7/GBuZU+z1x1S19TSO6+uqYUDRwaGdV56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HQBn+V+7njaz2ePUrpFwwLNm\nttnMrh9kebzsExh+WyA+9ks5UA/82u/W+5WZZfRbJ172SzTbAvGxX3p8DnhskPljuk8mVKCb2UXA\nPufc5li35XhEuR2vA1Occ/OAnwF/HJfGjcwnnHMVeF8Xv2JmI/vX5RPDcNsSL/slCfg48Avn3ALg\nMHBLbJs0YtFsS7zsF/wuo4uBJ8b7vSdUoANLgYvNrAb4HXC2mf223zq7gMlhj8v8eRPJsNvhnGt2\nzh3y7/8ZSDazgnFvaRScc7v86T68PsHF/VaJh30CDL8tcbRfaoFa59yr/uN1eKEYLl72y7DbEkf7\nBbxi4XXn3N5Blo3pPplQge6c+7Zzrsw5NxXvK8vzzrkr+622AbjaP1p8JtDknKsb77YeTTTbYWbF\nZmb+/cV4+6Jh3Bs7DDPLMLOsnvvAp4Gt/Vab8PsEotuWeNkvzrk9wE4zm+nPWgm83W+1uNgv0WxL\nvOwX3+cZvLsFxnifTNRRLhHM7EsAzrn7gT8DFwI7gCPAtTFs2jHptx2XAjeaWSfQAnzOTcyzvIqA\nP/ifpSRpzjgAAAAAZ0lEQVTgUefcX+J0n0SzLfGyXwC+Cjzif8V/D7g2TvcLDL8tcbFf/ELhXOCG\nsHnjtk90pqiISEBMqC4XEREZOQW6iEhAKNBFRAJCgS4iEhAKdBGRgFCgi4gEhAJdRCQgFOgiIgHx\n/wHe1zl4uwVsqgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x18ee218c320>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8VdWd9/HPIgQSCBByIYRLyJUQCBDkIiGC3C/e6MzT\ndqa1WtuZYm3rpWM77XSmo/M8M33ZEW3Hjo5jR1o71bZWa6EqiihWAQVBEQIxJIEAg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x7773ceuutNDU10draSmlpKbm5uTz99NNkZWXx1a9+lSeeeIJ7772Xu+++m40b\nNxIdHc3vfvc7/vEf/5ENGzawbt06nnzySVJSUti1axff+MY3eOutt7j33nu56667uP322y94I/EH\nny+KGmPCgBeB+6y1FxRLtk79gEvWEDDGrDPG7DHG7CkrK+tWY0XEnWbPns3evXupra1l6NChZGZm\nsmfPHt59910WLlx4wbIJCQlkZGS0/VxhYSHV1dVUV1ezaNEiAG677ba25TMzM/nRj37Ej3/8Y44d\nO0ZoaCjABXVavvSlL7F9+3Zyc3PJzs5mxYoVZGRk8K//+q8UFRVRX1/Pzp07+dznPkdGRgZ33nln\n25n7jh07+MIXvvCp7fqDT2foxphgnDB/1lr7B+/TpcaYWGttsTEmFrhkOTRr7VPAU+DUcumBNotI\nb7rCmXRvCQ4OJiEhgV/+8pcsWLCAGTNmsG3bNvLz8z9V16RjCd2goKC2LpfL+eIXv8i1117LK6+8\nwg033MB///d/k5iYeNkSu9OmTeO999674LXa2lrCw8PZt2/fJbfRX26w7csoFwM8DeRYax/t8NIm\n4Mvex18GeueeSiIyICxcuJD169ezaNEiFi5cyJNPPsmsWbN8Csvw8HDCw8PZvn07AM8++2zba0eO\nHCExMZF77rmHtWvXsn//fgCOHz/eFtzPPfcc1113HampqZSVlbU939zczMGDBxk5ciQJCQn8/ve/\nB5z65h9//DEAWVlZ/Pa3v/3Udv3Bly6XLOA2YKkxZp/36wbgIWCFMSYPWO79XkSkSxYuXEhxcTGZ\nmZnExMQQEhLyqe6WK/nFL37BN7/5TTIyMuhYRfb5558nPT2djIwMsrOzuf322wFITU3l8ccfJy0t\njaqqKu666y6GDBnCCy+8wPe+9z1mzpxJRkYGO3fuBJywfvrpp5k5cybTpk1ruy/of/zHf/D4448z\nffp0Tp482YO/kaun8rki4qryub4oLCzkpptuIjs7299N+RSVzxUREQW6iAw88fHx/fLsvLsU6CIi\nLqFAFxEA+vJ6mlxad4+BAl1ECAkJoaKiQqHuR9ZaKioqCAkJ6fI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iLW2Cfgt\nsPaiZdYCv7KO94FwY0xsXzfUB77sS0CwTn2eyissEhDHxIf9CBjW2mJr7Yfex3VADjD+osUC5bj4\nsi/9nvf3XO/9Ntj7dfFFyl49Jv0t0McDJzp8X8SnD6wvy/QHvrZzgfej12ZjzLS+aVqPC5Rj4ouA\nOx7GmHhgFs4ZYUcBd1yusC8QAMfGGBNkjNkHnAbesNb26TEJjHuKuteHQJy1tt4YcwPwRyDFz20a\nyALueBhjwoAXgfustbX+bk93dLIvAXFsrLWtQIYxJhx4yRiTbq3tsxpX/e0M/SQwscP3E7zPXe0y\n/UGn7bTW1p7/iGatfRUINsZE9V0Te0ygHJMrCrTjYYwJxgnAZ621f7jEIgFzXDrbl0A7NtbaamAb\nsPqil3r1mPS3QP8ASDHGJBhjhgB/DWy6aJlNwO3eq8XzgRprbXFfN9QHne6LMWasMcZ4H8/DOR4V\nfd7S7guUY3JFgXQ8vO18Gsix1j56mcUC4rj4si+BcGyMMdHeM3OMMaHACuCTixbr1WPSr7pcrLUt\nxphvAa/jjBLZYK09aIz5uvf1J4FXca4U5wMNwFf81d4r8XFfPgvcZYxpAc4Cf229l8L7E2PMb3BG\nGUQZY4qAB3Au+ATUMfFhPwLieHhlAbcBB7x9tgA/AOIgsI4Lvu1LIBybWOAZY0wQzhvO89bal/sy\nvzRTVETEJfpbl4uIiHSRAl1ExCUU6CIiLqFAFxFxCQW6iIhLKNBFRFxCgS4i4hIKdBERl/j/XH44\nbVZWYfYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x18edeeb0be0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt4VdWB9/HvygVyT8gVQggJkETkkiARRQRFQKz6lr7z\nVN9p8cI4b7HWKWpn2tp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EKBLiLiEQp0ERGPUKCLiHiEAl1ExCPO6YlFIuJNzc3NlJaW0tDQEOiijGgRERFk\nZGQQHh7er88r0EWE0tJSYmNjycrKwhgT6OKMSNZajh8/TmlpKdnZ2f06hrpcRISGhgaSkpIU5gFk\njCEpKem8/kpSoIsIgMI8CJzvOVCgi0jAVVVV8dhjjwW6GL166KGHqK+vD3QxeqRAF5GAC5ZAt9bi\n8/l63N6fQG9paTnfYvWZAl1EAu7ee+9l7969FBQU8PWvf50f//jHXHzxxcycOZPvfe97AJSUlHDB\nBRewYsUKcnNzWb58ORs2bGDevHnk5OTw/vvvA3Dfffdx8803M3fuXHJycnjyySf939PTcfPy8rjl\nlluYPn06hw4d4o477qCwsJBp06b593vkkUc4cuQICxcuZOHChQDExMT4j/3888+zYsUKAFasWMGX\nv/xlLrnkEr7xjW9QV1fHbbfdxpw5c5g1axZr164dlN+jRrmISCf/9j87+eRI9YAe88L0OL73v6b1\nuP3+++9nx44dbN26lXXr1vH888/z/vvvY63ls5/9LG+88QaZmZns2bOH5557jtWrV3PxxRfz9NNP\ns2nTJl544QV+8IMf8Oc//xmA7du38+6771JXV8esWbO47rrr2LFjB8XFxd0et7i4mDVr1nDppZcC\n8P3vf5/ExERaW1tZtGgR27dvZ9WqVTz44INs3LiR5OTkXutcWlrK22+/TWhoKN/+9re56qqrWL16\nNVVVVcyZM4fFixcTHR09ML9glwJdRILKunXrWLduHbNmzQKgtraW4uJiMjMzyc7OZsaMGQBMmzaN\nRYsWYYxhxowZlJSU+I+xbNkyIiMjiYyMZOHChbz//vts2rSpx+NOnDjRH+YAzz77LE888QQtLS2U\nlZXxySefMHPmzHOqxw033EBoaKi/Ti+88AIPPPAA4IwqOnjwIFOnTu3376k7CnQR6eRsLemhYK3l\nW9/6Frfffnun9SUlJYwePdr/PiQkxP8+JCSkU19119EixpizHrdjS3n//v088MADfPDBB4wZM4YV\nK1b0OJSw4/d03afjMa21/OEPfyAvL++sdT9f6kMXkYCLjY2lpqYGgKVLl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W6iIhHKNBFRDxCgS4i4hEKdBERj/j/\nJxnjBL9QmiEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x18ee219f8d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "g.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h4>Group data using custom function: Let's say you want to group your data using custom function. Here the requirement is to create three groups<h4>\n",
    "<ol>\n",
    "    <li>Days when temperature was between 80 and 90</li>\n",
    "    <li>Days when it was between 50 and 60</li>\n",
    "    <li>Days when it was anything else</li>\n",
    "</ol>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For this you need to write custom grouping function and pass that to groupby"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def grouper(df, idx, col):\n",
    "    if 80 <= df[col].loc[idx] <= 90:\n",
    "        return '80-90'\n",
    "    elif 50 <= df[col].loc[idx] <= 60:\n",
    "        return '50-60'\n",
    "    else:\n",
    "        return 'others'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pandas.core.groupby.groupby.DataFrameGroupBy object at 0x0000018EE31DCDA0>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g = df.groupby(lambda x: grouper(df, x, 'temperature'))\n",
    "g"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Group by Key: 50-60\n",
      "\n",
      "         day   city  temperature  windspeed   event\n",
      "9   1/2/2017  paris           50         13  Cloudy\n",
      "10  1/3/2017  paris           54          8  Cloudy\n",
      "Group by Key: 80-90\n",
      "\n",
      "        day    city  temperature  windspeed  event\n",
      "4  1/1/2017  mumbai           90          5  Sunny\n",
      "5  1/2/2017  mumbai           85         12    Fog\n",
      "6  1/3/2017  mumbai           87         15    Fog\n",
      "Group by Key: others\n",
      "\n",
      "         day      city  temperature  windspeed   event\n",
      "0   1/1/2017  new york           32          6    Rain\n",
      "1   1/2/2017  new york           36          7   Sunny\n",
      "2   1/3/2017  new york           28         12    Snow\n",
      "3   1/4/2017  new york           33          7   Sunny\n",
      "7   1/4/2017    mumbai           92          5    Rain\n",
      "8   1/1/2017     paris           45         20   Sunny\n",
      "11  1/4/2017     paris           42         10  Cloudy\n"
     ]
    }
   ],
   "source": [
    "for key, d in g:\n",
    "    print(\"Group by Key: {}\\n\".format(key))\n",
    "    print(d)"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
